{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
                <div class="box-header with-border">
                    <span class="fa fa-user-plus" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>

                    <a href="index.php?a=user.list&type=staff" class="btn {%if $type eq 'staff'%}btn-primary{%else%}btn-default{%/if%} btn-sm">教师列表</a>
                    <a href="index.php?a=user.list&type=student" class="btn {%if $type eq 'student'%}btn-primary{%else%}btn-default{%/if%} btn-sm">学生列表</a>
                    <a href="index.php?a=user.list&type=repair" class="btn {%if $type eq 'repair'%}btn-primary{%else%}btn-default{%/if%} btn-sm">外部业务人员</a>
					<a href="index.php?a=user.list&type=admin" class="btn {%if $type eq 'admin'%}btn-primary{%else%}btn-default{%/if%} btn-sm">超级管理员</a>
                    <a href="index.php?a=user.add" class="btn btn-success btn-sm" style="float:right; color:#fff;">添加用户</a>
                </div>
                   <div class="box-body">
                     <form action="" method="get">
                        <div class="col-sm-3 form-group">
                              <label class="col-sm-5 control-label text-right" >
                                   用户名：
                              </label>
                              <div class="input-group col-md-7 col-xs-12">
                                   <input type="text" class="form-control" value=""  name="name">
                              </div>
                            </div>
                         <div class="col-sm-3 form-group">
                            <label class="col-sm-5 control-label text-right" >
                                姓名：
                            </label>
                            <div class="input-group col-sm-7 col-xs-12" >
                                <input type="text" class="form-control" value=""  name="true_name">
                            </div>
                         </div>
						 {%if $type == 'student'%}
                         <div class="col-sm-4 form-group">
                            <label class="col-sm-4 control-label text-right">
                                班级
                            </label>
                            <div class="input-group col-sm-5 col-xs-12" style="float:left; margin-right:8px;">
                                <select class="form-control" id="class_id" name="class_id">
                                    <option value="">-请选择-</option>
                                    {%foreach from=$classes key=key item=value%}
                                    <option value="{%$value.class_id%}">{%$value.class_name%}</option>
                                    {%/foreach%}
                                </select>
                                </div>				  
                        </div>
						{%/if%}
						<input type="hidden" name="a" value="user.list">
					    <input type="hidden" name="type" value="{%$type%}">
					    <button type="submit" class="btn btn-warning">查 询</button>
                    </form>
					<div style="clear:both;"></div>
					{%if $type eq 'student'%}
                    <a href="index.php?a=user.status&status=0" class="btn btn-default btn-sm">停用所有学生帐号</a>
                    <a href="index.php?a=user.status&status=1" class="btn btn-default btn-sm">启用所有学生帐号</a>{%/if%}
                        <table class="table table-bordered"  id="mytable">
                                <thead>
                                    <tr>
                                        <td>id</td>
                                        <td>用户名</td>
										{%if $type == 'student'%}
                                        <td>班级</td>
										{%/if%}
                                        <td>姓名</td>
										<td>用户类型</td>
										<td>用户组</td>
										<td>添加时间</td>
										<td>最后一次修改</td>
										<td>操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								{%foreach from=$user_lists key=key item=value%}
                                    <tr>
                                        <td>{%$value.user_id%}</td>
                                        <td>{%$value.user_name%}</td>
										{%if $type == 'student'%}
                                        <td>{%$value.class%}</td>
										{%/if%}
                                        <td>{%$value.true_name%}</td>
                                        <td>{%$value.type_note%}</td>
                                        <td>{%$value.user_group%}</td>
                                        <td>{%$value.create_time%}</td>
                                        <td>{%$value.update_time%}</td>
										<td>
										<a href="index.php?a=user.pms&user_id={%$value.user_id%}">权限</a>
										<a href="index.php?a=user.update&user_id={%$value.user_id%}">修改</a>
										{%if $value.status=='1'%}
										<a href="index.php?a=user.freeze&user_id={%$value.user_id%}" onclick="if(confirm('警告！确认冻结?')==false)return false;">冻结</a>											
										{%else%}
										<a href="index.php?a=user.unfreeze&user_id={%$value.user_id%}" >解冻</a>	
										{%/if%}
										{%if $value.user_type!='admin'%}
										<a href="index.php?a=user.infoupdate2&user_id={%$value.user_id%}">档案</a>
										{%/if%}
										</td>
                                    </tr>	
								{%/foreach%}
                                </tbody>	
                        </table>

								{%$page%}
				   </div><!--box-body -->
           </div><!--box box-default box-solid-->
        </section>    
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}

